Made menu more functional, txtlayer works now

This might be the first time I've ever used function pointers in my
entire life. A momentous occasion indeed.