Function name changes and bug fixes

All functions have been switched over to a new style of function name. This groups functions better and keeps it more in line with standard language conventions.

Multiple functions with similar principles are grouped by function[action].

Also fixed a few comment issues.