Big frontend update. Fixes #1, #2