Code update

general modifications (operational main)