Removed unused files and some fixes. Not tested yet