MAJOR UPDATE: cleaned up excess classes and functions.