Removed legacy code and comments
Solved deprecated conversion warning w/ const_cast