condensed return statements with last operation; changed docblocks to proper return type notation