Cleanup code a little bit