Continued cleaning up code