Animation now works on setTime. +cleaner code