Memory and Performance improvements. Also re-arranged stuff in preparation for sFlow.