coding style: removed trailing whitespaces
Add consistent 4 space indentation

Applied 4 space indentation all along the main pson.py file.
Coding style: reformatted test file

Introduced 4 space indentation to the test file, made sure the code
adheres to 80 character per line limit, and removed trailing whitespace.
Testing: Added error cases

Added error cases to increase the test coverage.