Actually could work for real backends now.

 * Added format string for the backends
 * Set up locks on port allocation / deallocation
 * General struct cleanup