Added data-alt support. Cleaned up for... loop and general code clean up.