cleaned up docs and code