Lots of changes. Added scripts and started tests