Added collision checking and got basic database save and recall working
Refactored lightining code