a workable mini mvc
clean up code
refactor a little bit of naive