Some bug fixes, more scripts