moved element styling out of js, closes #1