Full implementation of jans4lc.sh