added SizeMap function, moved some includes around to get rid of errors, cleaned the constructor