Refactored py files
Added kn#64
Refactored things