Implemented extern struct and func definitions; removed ref