First part of fixes after tests