a lot of refactoring - divide modules and componenets