Some library changes to tidy things ups.
And fixed achievements. Should be working now.