Solved a parameter issues and now have an almost complete script!