Suggestions for improving the code