Change from tabs to spaces and add docs