Updated to match most recent version

There might be some stuff missing but overall this should be close to
the 1.5.2 version