LOTS of code cleanup and styling; made protocol methods optional