Working through functions and filters

Added filters and hooks to plugin