Issue #44 implementation

This closes #44.
All the logic moved to server side now so all the CSS declarations can be manipulated in one place.