Improvements in code