Final tweaks, seems to be working.