Removed code duplication in idv, leveled and websql adapters.
Added a few semicolons
Fixed some nit stuff like checking for undefinedness
Merge pull request #455 from benrudolph/api-abstraction

Api abstraction