Clean up code based on feedback from armon