refactored some code and starting to implement ngbootstrap structure