Updated functions and added new functions and constants