Fixed timer and various fixes