Cleaned up main class and moved deprecated functions to end of file