Multiple improvements to util functions
Added state helper functions
Changed includes to include new files
Deleted parts of code that were moved to state helpers
Changed the main() description so it fits the standards
Changed the code formatting to fit standards more
Multiple small changes to main()