simplified the structure, added comments and linted the files