Make use of docl & cleanup the script a bit