Cleaned up various classes and re-factored.