Proper Loops

Loops working, beta 1, committing for reference at later date