Fixed syntax bugs on models and routes