Cleanup and suggestion regarding Tabs

removed some excessive code and comments. also suggested splitting up
functions.

NEED TO DISCUSS HOW TO SOLVE TABS .