Added basic geometry functions for logic engine and started outlining functions.