Reset button working and segregration of code done