CSS cleanup, slight refactoring db conn