Various refactoring and also added new tests      Refactored internal proplists-based list of PID in favor of a ets table. Also added more tests/APIs and code coverage support when running tests.