Clean up code little a bit