Added comments; changed declaration of constants