Added exception classes and DAO implementation