some optimizations and cleanup
update readme