Moved backend to separate file, added linebreaks.