Added constants, fixed time issue