Improved code, removed unnecesary libs