Merge pull request #1 from sarvsav/master

Review code1
Added more functions

Separated rectangle color rotation and rendering into functions.
Functions

More changes for functions