First pass at code clean up.