Added: Used all listener code to run in server