Cleanup code a bit more