Cleaned up encoding a bit