alot cleanup, simplified api, made docs nicer