link to maths lib, fix palette globals