Refactor move prototypes to proto module