improved basic error handling stuff, comments
added managed activity
multiple improvements