Add optimization flag for realtime.
Clean up dependencies and add optimization flag.