Base implementation. Sort of working
Fixed improved the function definition stuff

Also fixed a bug in ternaries with true/false