Some few improvments + some tests