Working on cleaning up code a bit more