Added some main stuff

Typedetection, variable detection etc etc