Second beta

Big update, code cleaning, RTMP support, preferences.