Introduction of DAL layer

Re-factoring servlets too to remove warnings.