Improved MyMainPanel class and added few more changes