Improved extension of protocols

Removed private library methods and variables so protocols can be
extended outside the library.