Rewrote everything to work using LomLib