Adding binSearch and fixed code style