Cleaned up Function/Function Listener code