Import existing code from LAL repository

* History partially compacted
* Broken history in original repo fixed