Adapted to spacing convention & added doc comments