Added function declarations and a couple constants