got rid of some warnings by specifying int
Cleaned Up some more code.