some minor code cleanup and SRS compiler logic fixes