FIX: shell controll, exceptions, memory management