Removed all lambda functions from hooks in accordance with better practice and instead wrote custom functions to be called with all of the hooks.