Many fix and improvments