Added DB and logic layer