Made an application class to keep global states and variables instead of
keeping them in the mainactivity. General cleanup.