minor bugs but lots broken. fix the bash scripts first.