add some python files and clean massy code