Updated feature function according to weights given on gamedev URL and
added optimization features in compilation process.