Basic non-functionality changing fixes

Gets rid of all warning when compiling as well as uses proper main function return values.