Added objects for general refactoring
Handler for onclick