Some cleanup and removed a deprecated method