Converted loops to it's own package
Making loop handlers more generic
Committing to investigate some issues