refactor preferences again, add profile image to notifications
refactor js initialization code into it's own file