Removed optimalization due to uneffectivity, fixed unused