Many changes and some finished functions