Small improvements + added documentaion.