Add some docblocks, better variable name, fix README examples