Writing synopsis and commenting the code.
Added formating option and more testing.