Fixed most performance issues, improved usability and style