0.4.0

Many improvements, completely rewritten