Various bugfixes

* PCHError -> IPCError
* Revised main()
* Resolved a conflict with built-in funcitons