improvements on code and project structure