fix build warnings/errors, typos and minor cleanup. no need to provide boost::throw_exception, better left it to the user