Improved code, added front-end