Refactor to work under MRI/Buildr infrastructure