Move functions and constants to prototype