added shake detection
various fixes for memory allocation onCreate