Added simple frontend, improved profiling (still slightly buggy)