Adds documentation. Renames few methods.