Code cleanup and sound loop WIP