Turning this bad boy into a rails app