Added basic looping. Style changes.