Make it build using psl1ght-v1 + fix a bunch of bugs