More const additions. Also removed an unused part