Added delegate + more refactoring