Adding jquery ui theme and doing some refactoring