cleanup warnings
add more documentation