WIP (split stuff out into separate files and hooked-up rake task)