Clean up various pieces of code a bit, remove left-overs.