Updated more documentation, removed some redundant code