Minor refactoring

Add beginnings of Constants class
Add some comments
Extract some helper methods