Move functions inside 1 prototype