Adding documentation, formatting