restructured code and adding packaging scripts