fix buffer bugs + flesh out viewport and marks