Beginning code cleanup