Cleaup code a bit