Cleanup and improve loop handling/break/continue
Remove `sizeof` operator. Use .length instead