reorganization of code and views