Removed exceptions, some optimization