Cleaned code [Stability not verified]