making ftask.py directly runnable
minor styling improvements