cleaned up markup, moved image handling to separate js lib