WIP: Some more updates

Do not merge now. Will fix a bug tomorrow.