changed startup code. added missed TODOs