added indir() and environment variables
added default value for "in_dir"
reordered sources
exec working rudimentary