structured project into directories and removed redundant code