Fixed several bugs, ready for deployment!