Moved save_posts to appropriate location, fixed encoding bug