Replace settings with struct
Also changes the use of pointers, settings in frame is now the struct, not a pointer
Make it compile on Ubuntu 14.04-64