Removed redundant code. Fixed docs