Added struct and constructor and set flags for background and redirect
Merge pull request #4 from gwhere/master

flag handling and struct additions