eliminated warnings from compilation
fixed some potential bugs. added python wrapper. doesn't return anything yet.