restructure project into model and handler