restructure project into python library