Bug fix

Few bug fixes (algorithm still has issues)
Added more methods