Sorted timer and memory leak issues