Completely rewritten

Rebuilt with new code; renamed script file