fix constants
tons of doc fixes, refactor search into a method