Fix indentation in Analysis Layer
Use logic controller in commandline interface
Fix calling of sql-functions
Fix computation of duration of worktime
Calculate worktime correctly if none is set yet