Changing some connections and improving interface