Gave up on stability analysis, cleaned code