Further refactoring of code structure to handle web services better.