Removed trailing whitespaces and added yard documentation.