Fixing issues with main actor and preview functions.
Other small bug fixes.