Added new functions
Added base dir implementation