cleaned up code, removed deprecated methods