Changed all function names to make more sense, added CamelCase, and fixed some code.