First refactoring and normalizations

Hey there,

accordioner from reddit here, hope these are welcome! Let me know if I need to change anything, in any possible way. 

Bye!