Fixes a few bugs.

- immediate function pushed to the bottom
- method visibility changes in Media