Added docs and updated comments and interfaces