Finished basic Logic Engine

Only need to delete the testing function
Small changes

Formatting aStyle