Some minor refactoring, moved rally mapping object to its own file, preparing to create actual rules using templates.