major bufixes & improvements