Fixes several bugs, feature calculation works now