added conntroller and model
minor refactor